package com.laowang.project.system.service.impl;

import java.util.List;
                                                        import com.laowang.common.utils.DateUtils;
import com.laowang.project.system.domain.MyCyhReview;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyCyhInterviewMapper;
import com.laowang.project.system.domain.MyCyhInterview;
import com.laowang.project.system.service.MyCyhInterviewService;

/**
 * 车友访谈Service业务层处理
 *
 * @author laowang
 * @date 2023-10-07
 */
@Service
public class MyCyhInterviewServiceImpl implements MyCyhInterviewService {
    @Autowired
    private MyCyhInterviewMapper myCyhInterviewMapper;

    /**
     * 查询车友访谈
     *
     * @param id 车友访谈ID
     * @return 车友访谈
     */
    @Override
    public MyCyhInterview selectMyCyhInterviewById(Integer id) {
        return myCyhInterviewMapper.selectMyCyhInterviewById(id);
    }

    /**
     * 查询车友访谈列表
     *
     * @param myCyhInterview 车友访谈
     * @return 车友访谈
     */
    @Override
    public List<MyCyhInterview> selectMyCyhInterviewList(MyCyhInterview myCyhInterview) {
        return myCyhInterviewMapper.selectMyCyhInterviewList(myCyhInterview);
    }

    /**
     * 新增车友访谈
     *
     * @param myCyhInterview 车友访谈
     * @return 结果
     */
    @Override
    public int insertMyCyhInterview(MyCyhInterview myCyhInterview) {
                                                                                                myCyhInterview.setCreateTime(DateUtils.getNowDate());
                            return myCyhInterviewMapper.insertMyCyhInterview(myCyhInterview);
    }

    /**
     * 修改车友访谈
     *
     * @param myCyhInterview 车友访谈
     * @return 结果
     */
    @Override
    public int updateMyCyhInterview(MyCyhInterview myCyhInterview) {
                                                                                                return myCyhInterviewMapper.updateMyCyhInterview(myCyhInterview);
    }

    /**
     * 批量删除车友访谈
     *
     * @param ids 需要删除的车友访谈ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhInterviewByIds(Integer[] ids) {
        return myCyhInterviewMapper.deleteMyCyhInterviewByIds(ids);
    }

    /**
     * 删除车友访谈信息
     *
     * @param id 车友访谈ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhInterviewById(Integer id) {
        return myCyhInterviewMapper.deleteMyCyhInterviewById(id);
    }

    @Override
    public List<MyCyhReview> selectMyCyhReviewListWeb(MyCyhInterview myCyhInterview) {
        return myCyhInterviewMapper.selectMyCyhReviewListWeb(myCyhInterview);
    }
}
